OpenBuildings GenerativeComponents Help

var

While not technically a type, the var keyword provides a way to declare variables without having to declare their types.

Example

var a, b, c;
var a=5, b='Hello', c=point01;

Variables created with var are treated the same as variables declared as object (which is the same as for untyped function arguments).

The primary motivation is to allow typeless programming in GCScript, for those who prefer it.

A disadvantage of using var comes when using the script editors' auto-complete facility, which cannot provide as much information about the variable because its actual type is not yet determined.